package 公司真题.极米;

import java.util.Arrays;
import java.util.Scanner;

public class _数组排序 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String nums = str.substring(0, str.length() - 2);
        nums = nums.replace('[', ' ').replace(']', ' ').trim();
        String[] sArr = nums.split(", ");
        int[] arr = new int[sArr.length];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(sArr[i]);
        }
        int[] res = new int[arr.length];
        boolean flag = false;
        int index1 = 0;
        int index2 = res.length >> 1;
        int res_index = 0;
        while (res_index < res.length) {
            if (!flag) {
                flag = true;
                res[res_index++] = arr[index1];
                index1 += 1;
            } else {
                flag = false;
                res[res_index++] = arr[index2];
                index2 += 1;
            }
        }
        System.out.println(Arrays.toString(res));
    }

    public int[] shuffle (int[] nums, int n) {
        int[] res = new int[nums.length];
        boolean flag = false;
        int index1 = 0;
        int index2 = nums.length >> 1;
        int res_index = 0;
        while (res_index < res.length) {
            if (!flag) {
                flag = true;
                res[res_index++] = nums[index1++];
                //index1 += 1;
            } else {
                flag = false;
                res[res_index++] = nums[index2++];
                //index2 += 1;
            }
        }
        return res;
    }


}
